package com.spartez.farhorizons.server.dao;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.spartez.farhorizons.client.data.ISystemDescr;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class SystemDescription implements ISystemDescr {
	@PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Long id;
	
	@Persistent
	private String type;
	@Persistent
	private int x;
	@Persistent
	private int y;
	@Persistent
	private int z;
	
	public SystemDescription() {
	}

	public SystemDescription(ISystemDescr other) {
		x = other.getX();
		y = other.getY();
		z = other.getZ();
		type = other.getType();
	}
	
	public Long getId() {
		return id;
	}
	
	public String getType() {
		return type;
	}
	
	public int getX() {
		return x;
	}

	public int getY() {
		return y;
	}

	public int getZ() {
		return z;
	}
}
